package kr.ragne.framework;

import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.view.KeyEvent;
import android.view.MotionEvent;

public class TestState implements IState {
//	private GraphicObject mImage;
	private SpriteAnimation spr;

	@Override
	public void Init() {
//		mImage = new GraphicObject(AppManager.getInstance().getBitmap(R.drawable.android));
		spr = new SpriteAnimation(BitmapFactory.decodeResource(AppManager.getInstance().getmResources(), R.drawable.walk));
		spr.InitSpriteData(125, 167, 5, 4);
	}

	@Override
	public void Destroy() {

	}

	@Override
	public void Update() {
		long gameTime = System.currentTimeMillis();
		spr.Update(gameTime);
	}

	@Override
	public void Render(Canvas canvas) {
//		mImage.Draw(canvas);
		spr.Draw(canvas);
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		return false;
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		return false;
	}

}
